public class asd {

	
	 void printArray(int [] a){
		for (int i=0; i<a.length; i++){		
				System.out.print(a[i]+" ");
		}
		
		try{

			a[10]=5;
			
		}
		
		catch (ArrayIndexOutOfBoundsException e) {
			System.out.println("Array is out of bounds.");
		}
		catch(NullPointerException e){
			System.out.println("Error: "+e.getMessage());
		}
	}


	public static void main(String[] args) {
		int [] arr = null;
//		int [] arr = new int [3];
//		int arr;
		
//		try{
//
//			arr[10]=10;
//			
//		}
//		
//		catch (ArrayIndexOutOfBoundsException e) {
//			System.out.println("Array is out of bounds.");
//		}
//		catch(NullPointerException e){
//			System.out.println("Error: "+e.getMessage());
//		}

		

	}
	
}